/* src/components/timeline/Timeline.css */
.timeline-container {
    display: flex;
    flex-direction: column;
    height: 100%; /* 占据父容器的全部高度 */
    max-height: 600px; /* 设置最大高度 */
    min-height: 200px; /* 最小高度 */
    overflow: hidden; /* 主容器不显示滚动条，由内部元素控制 */
    user-select: none; /* 防止拖拽时文本被选中 */
    cursor: default;
    background-color: #1a1a1a;
}

.timeline-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 8px 15px;
    background-color: #2a2a2a;
    border-bottom: 1px solid #333;
    font-size: 0.9em;
    flex-shrink: 0; /* 不允许缩小 */
    min-height: 40px;
}

.timeline-zoom-controls button {
    background-color: #444;
    color: #fff;
    border: none;
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 3px;
}
.timeline-zoom-controls button:hover {
    background-color: #555;
}

.timeline-main-area {
    display: flex;
    flex-grow: 1; /* 占据剩余垂直空间 */
    overflow-y: auto; /* 整个轨道区域的垂直滚动 */
    overflow-x: hidden; /* 隐藏水平滚动条 */
    position: relative;
    max-height: calc(100% - 120px); /* 减去控制区和添加按钮区域的高度 */
    /* 自定义滚动条样式 */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #444 #2a2a2a; /* Firefox */
}

/* Chrome, Safari, Opera: 自定义滚动条样式 */
.timeline-main-area::-webkit-scrollbar {
    width: 8px; /* 设置滚动条宽度 */
}
.timeline-main-area::-webkit-scrollbar-track {
    background: #2a2a2a; /* 滚动条轨道背景 */
    border-radius: 4px;
}
.timeline-main-area::-webkit-scrollbar-thumb {
    background-color: #444; /* 滚动条滑块颜色 */
    border-radius: 4px; /* 滚动条滑块圆角 */
    border: 1px solid #333; /* 滚动条滑块边框 */
}
.timeline-main-area::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* 悬停时的颜色 */
}

.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 4px 0; /* 添加一些内边距 */
    min-height: fit-content; /* 确保内容高度 */
}

.add-tracks-section {
    flex-shrink: 0; /* 不允许缩小 */
    width: 100%;
    border-top: 1px solid #333;
    background-color: #2a2a2a;
    padding: 8px 0;
}

/* 新增的控制区域样式 */
.timeline-controls-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.timeline-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.zoom-slider {
    width: 90px;
    height: 4px;
    background: #444;
    outline: none;
    border-radius: 2px;
    cursor: pointer;
}

.zoom-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #007acc;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #007acc;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zoom-label {
    color: #f0f0f0;
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
}

.timeline-left-spacer {
    width: 25px;
    flex-shrink: 0;
}

/* 时间线游标样式 */
.timeline-main-area {
    position: relative;
}

.tracks-list {
    position: relative;
}